package com.ypy.flexiplug.plugin.prometheus.impl;

import com.ypy.flexiplug.plugin.prometheus.IPrometheusPlugin;
import com.ypy.flexiplug.plugin.prometheus.parse.PrometheusParser;
import lombok.extern.slf4j.Slf4j;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
public class PrometheusPlugin implements IPrometheusPlugin {

    @Resource
    private PrometheusParser prometheusParser;

    @Override
    public <T> List<T> parse(String body, Class<T> clz) {

        return (List<T>)prometheusParser.parse(body,clz);

    }
}
